This invention relates in general to computers, and more particularly to a graphics card with high speed line draw processor.
In order to communicate with a user, a computer must be able to output information to a display. In a graphics system, the display is defined by an array of pixels. For example, in a standard-mode VGA (Video Graphics Adapter) system, the screen is addressed as an array of 640xc3x97480 pixels. Each pixel on the display may be set to a desired color from a defined palette. Typically pallettes of 16 or 256 are supported. The number of pixels which may be displayed is defined by the graphic subsystem. Typical VGA modes support 640xc3x97480, 800xc3x97600, and 1024xc3x97768 resolutions. VGA modes with resolution greater than 640xc3x97480 are generally referred to as xe2x80x9cSuper VGAxe2x80x9d.
Many of today""s application programs are graphics intensive. For example, a computer-aided design program, such as AUTOCAD by AutoDesk, Inc., Sauseleto, Calif., may spend a substantial amount of time drawing a figure to the screen. In some cases, even a small change in the drawing will require the entire drawing to be redrawn. Consequently, the ability of the graphics processor to draw lines quickly becomes of critical importance.
The problems associated with line drawing have been well documented for a number of years. Many of these problems are addressed in an article xe2x80x9cAmbiguity in Incremental Line Rasteringxe2x80x9d, by Jack E. Bresenham, IEEE CGandA, May, 1987, which is incorporated by reference herein. The Bresenham article describes problems in drawing a line using an array of pixels, since lines having real values between two discrete pixels will have to approximated using one pixel or the other. Because of the inaccuracies inherent in approximating the line, issues concerning the retraceability of lines and the handling of symmetric figures made up of polylines become important. Consequently, the flexibility of a graphics processor, i.e., the ability of the graphics processor to facilitate modification of the line drawing parameters is highly desirable.
Therefore, a need has arisen in the industry for a graphics processor which provides fast and flexible processing of lines and polylines.
In accordance with the present invention, a method and apparatus for increasing the speed and flexibility of line drawing in a graphics processor is provided which eliminates substantial problems with the prior art.
Circuitry is provided for receiving first and second values indicative of the coordinates of respective end points of a line. The reception of the second value is sensed and line data is generated responsive thereto.
Accordingly, the present invention significantly increases the speed of a line draw operation, since an additional cycle for receiving a start signal from the host application is eliminated. This advantage becomes increasingly significant where many lines are drawn, for example, to implement a curve in a CAD drawing.
In the preferred embodiment, the automatic generation of the line data may be enabled or disabled to provide flexibility. To further increase speed, buffering may be implemented, wherein data is written to the coordinate registers while the line data is being generated.